package com.baidu.shop.mapper;

import com.baidu.shop.entity.CategoryBrandEntity;
import com.baidu.shop.entity.CategoryEntity;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.additional.insert.InsertListMapper;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @Description:
 * @ClassName: CategoryBrandMapper
 * @Author: User
 * @date: 2020.09.01 14:25
 * @version: 1.0
 */
public interface CategoryBrandMapper extends Mapper<CategoryBrandEntity> , InsertListMapper<CategoryBrandEntity> {

    @Select(value = "select * FROM  tb_category WHERE id in(select category_id FROM  tb_category_brand where brand_id = #{id})")
    List<CategoryEntity> getCategory(Integer id);
}
